package com.biz.primus.ms.oms.service.core;

import com.biz.primus.base.vo.PageResult;
import com.biz.primus.model.oms.enums.OrderInterceptType;
import com.biz.primus.model.oms.vo.OrderInterceptQueryVo;
import com.biz.primus.model.oms.vo.OrderInterceptVo;
import com.biz.primus.ms.oms.dao.po.OrderIntercept;

import java.util.List;

/**
 *订单拦截
 * @author  LGJ
 * @date 2017/11/24
 */
public interface OrderInterceptService {


    /**
     * 保存拦截规则
      * @param orderInterceptVos
     */
    void saveOrderIntercept(List<OrderInterceptVo> orderInterceptVos);

    /**
     * 删除拦截规则
     * @param id
     */
    void delOrderIntercept(String id);


    /**
     * 设置状态
     * @param id
     * @param state
     */
    void setState(String id,boolean state);

    /**
     * 查询拦截规则列表
     * @return
     */
    PageResult<OrderInterceptVo> findAllOrderIntercept(OrderInterceptQueryVo orderInterceptQueryVo);

    /**
     * 查询满足拦截类型的并且状态为启用的拦截规则
     * @param orderInterceptTypes
     * @return
     */
    List<OrderInterceptVo> findByStateAndType(List<OrderInterceptType> orderInterceptTypes);
}
